home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 3 #3 / Commodore_Disk_User_Vol.3_3_1990_-.d64 / colour restorer (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  5KB  |  106 lines

  1. 1 poke53280,5:poke53281,11:poke53265,11:a=a+1:ifa=1thenload"scr.code",8,1
  2. 2 gosub98:poke650,255:print"[145][145] ** [210]outine [201]nitiated **":sys49152
  3. 3 print"[155] [212]he colours selected by  [195]ommodore for  the screen restore  are acceptab";
  4. 4 print"le but  you may  find  that you  would like an  alternative that suits yo";
  5. 5 print"u better. [212]he  machine code  program  allows  you  to  choose  the  colou";
  6. 6 print"rs  for  the  screen  restore. [201]t is important that you know  exactly  ho";
  7. 7 print"w  to  use it.  [195]onsult the  magazine  for  detailed  instructions."
  8. 8 poke53265,27:poke198,0:poke56295,10:c=9:p=62:s1=49152:s2=s1:d=8
  9. 9 fori=0to42:poke679+i,peek(49336+i):next
  10. 10 c=c+1:ifc=10thenp=252-p:poke2023,p:c=0
  11. 11 geta$:ifa$=""then10
  12. 12 gosub98:gosub103
  13. 13 ifef=0andd<15thenopen15,d,15:input#15,a,b$,a$,a$:close15:print"[145][145] "b$""
  14. 14 ifs1<>s2thenprint" [195]ode altered for start at[158]"s2""
  15. 15 print" [193]ctual code:[158]"s1"to[158]"s1+183"incl."
  16. 16 print" [196]evice:[158]"dtab(12)"[[196][201][211][203]]";:ifd=15thenprint"[157][157][157][157][157][157][157][157]  [[212][193][208][197]]"
  17. 17 print"[159] f1:[155] [193]lter code for relocation
  18. 18 [153]"open f3:list (NULL)ransfer altered code":[153]"open f5:list (NULL)ave code":[153]"open f7:list lenhange colours
  19. 19 print"[159]  [196]:[155] [195]hange device number"
  20. 20 geta$:ifa$=chr$(133)then26
  21. 21 ifa$=chr$(134)then36
  22. 22 ifa$=chr$(135)then42
  23. 23 ifa$=chr$(136)then86
  24. 24 ifa$="d"thend=d+1:d=d+8*(d=16):printleft$("",8-2*(s1<>s2)):goto16
  25. 25 goto20
  26. 26 gosub101:print" [197]nter address of start of code":print" (in decimal)":a$=""
  27. 27 print" :[158]"chr$(34)chr$(20);:open1,0:input#1,a$:close1:print:a=val(a$):ifa=0then12
  28. 28 ifa<820ora>65352then26
  29. 29 if((a>1023)or(a+183>1023))and((a<2024)or(a+183<2024))then26
  30. 30 s2=a:print" [193]ltering code for start at[158]"s2:restore:fori=1to14:readd1,d2
  31. 31 d1=s1+d1:d2=s2+d2:poked1+1,d2/256:poked1,(d2/256-int(d2/256))*256:next
  32. 32 data1,49,4,56,7,21,22,9,25,169,28,9,31,170,34,9,37,183,54,40,61,40
  33. 33 data84,106,117,136,129,183
  34. 34 d1=s1+50:d2=s2+63:poked1,(d2/256-int(d2/256))*256:poked1+2,d2/256
  35. 35 print" [208]rocess complete... [208]ress any key":poke198,0:wait198,1:poke198,0:goto12
  36. 36 gosub101:ifnot(((s2>=s1)and(s2<s1+184))or((s2+184>s1)and(s2+184<s1+184)))then40
  37. 37 print" [195]annot transfer to this position."
  38. 38 print" [211]tarts or ends within original range.":print" [208]ress any key"
  39. 39 poke198,0:wait198,1:poke198,0:goto12
  40. 40 print" [207]k. [212]ransferring from[158]"s1"to[158]"s2:fori=0to183
  41. 41 pokes2+i,peek(s1+i):next:s1=s2:goto35
  42. 42 gosub103:ifef=1then14
  43. 43 as=s1:bc=s2:l=185:gosub101:ifd<15then50
  44. 44 ifs1=s2then66
  45. 45 print" [195]ode has been changed  for relocation."
  46. 46 print" [201]t can therefore not be saved to tape."
  47. 47 print" [193]lter  code  for  relocation  to point"
  48. 48 print" shown by [158]'[193]ctual [195]ode' above or  press"
  49. 49 print" 'f3' to transfer the code.":goto35
  50. 50 print" [215]ould you like the routine to autoboot"
  51. 51 print" [208]lease press '[217]' or '[206]'.":poke198,0
  52. 52 geta$:ifa$="n"thengosub101:print"[145][145] [208]lease wait...":goto68
  53. 53 ifa$<>"y"then52
  54. 54 ifs2>2023then57
  55. 55 gosub101:print" [210]outine cannot autoboot if the code is"
  56. 56 print" loaded to[158]"s2:print" [208]ress any key":poke198,0:wait198,1:poke198,0:goto12
  57. 57 gosub101:restore:print"[145][145] [208]lease wait...":fori=1to28:reada:next
  58. 58 fori=0to91:reada:poke1624+i,a:next:fori=0to183
  59. 59 poke1716+i,peek(s1+i):next:poke1659,s2/256:poke1658,(s2/256-int(s2/256))*256
  60. 60 data54,3,237,246,62,241,47,243,102,254,165,244,237,245,0,0,120,169,202,162
  61. 61 data241,141,38,3,142,39,3,88,162,0,189,130,3,157,0,0,232,224,184,208,245,173
  62. 62 data43,4,174,44,4,172,57,4,141,32,208,142,33,208,140,134,2,32,0,0,169,78,162
  63. 63 data69,160,87,141,119,2,142,120,2,140,121,2,169,13,162,147,141,122,2,142,123
  64. 64 data2,169,5,133,198,96
  65. 65 poke1684,peek(1658):poke1685,peek(1659):l=276:as=1624:bc=806:goto68
  66. 66 print" [208]lease press [208][204][193][217] and [210][197][195][207][210][196] on your"
  67. 67 print" cassette deck.[151]"
  68. 68 f$="scr.code"+str$(s2):dv=d+14*(d=15):ifd<15thenf$="@:"+f$
  69. 69 sys679 f$,dv,2,as,as+l
  70. 70 if(as=s2)and(s1=s2)thenprint"";:goto35
  71. 71 t=18:s=1:f=0:open15,d,15:open8,d,8,"#":f$=mid$(f$,3)
  72. 72 print#15,"u1 8 0"t;s:get#8,a$:t=asc(a$+chr$(0)):get#8,a$:s=asc(a$+chr$(0))
  73. 73 fori=0to7:print#15,"b-p:8"i*32:s$="":get#8,a$:get#8,a$:get#8,p$
  74. 74 get#8,t$:get#8,t2$:ift$=""orp$<>chr$(130)then79
  75. 75 forj=1to16:get#8,a$:ifa$=""thena$=chr$(0)
  76. 76 ifasc(a$)=160then78
  77. 77 s$=s$+a$
  78. 78 next:ifs$=f$thenf=1:n=i:i=8:t=0
  79. 79 next:ift<>0then72
  80. 80 iff=0then84
  81. 81 t=asc(t$+chr$(0)):s=asc(t2$+chr$(0)):print#15,"u1 8 0"t;s
  82. 82 print#15,"b-p:8 2":print#8,chr$((bc/256-int(bc/256))*256)chr$(int(bc/256));
  83. 83 print#15,"u2 8 0"t;s:close8:close15:print"";:goto35
  84. 84 gosub101:print"[145][145] [196]isk [214]erify [197]rror.":print" [198]ile scratched.":print#15,"s0:"+f$
  85. 85 close8:close15:print"";:goto35
  86. 86 gosub101:print" [195]hange colours":print"[159] f1:[155] [194]order colour":c1=peek(s1+169)and15
  87. 87 print"[159] f3:[155] [194]ackground colour":print"[159] f5:[155] [201]nk colour":c2=peek(s1+170)and15
  88. 88 print"[159] f7:[155] [210]eturn to main menu":poke198,0:c3=peek(s1+183)and15
  89. 89 ifc2=c3then94
  90. 90 print"[145][145][145][145][145][145][145]"tab(25);:poke646,c1:print"   "
  91. 91 poke646,c2:printtab(25)"   ":poke646,c3:printtab(25)"   ":poke198,0
  92. 92 geta$:ifa$=""then92
  93. 93 ifa$=chr$(133)thenc1=c1+1:c1=c1+16*(c1=16):goto90
  94. 94 ifa$=chr$(134)thenc2=c2+1:c2=c2+16*(c2=16):goto89
  95. 95 ifa$=chr$(135)thenc3=c3+1:c3=c3+16*(c3=16):goto89
  96. 96 ifa$=chr$(136)thenpokes1+169,c1:pokes1+170,c2:pokes1+183,c3:goto12
  97. 97 goto92
  98. 98 print"[147]  [150][181][129][161][158][182][170][154] [146] [211]elective [195]olour [210]estore [154] [180][158][181][129][161][146][150][182]"
  99. 99 print" [194]y [202]ason [198]inch      ([195]) [211]eptember 1989"
  100. 100 print"                                        ":return
  101. 101 print"":fori=1to9:print"[151]                                       "
  102. 102 next:print"[145][145][145][145][145][145][145][145][145][145]":return
  103. 103 ef=0:a$="ok                                   ":ifd=15then105
  104. 104 open1,d,0:poke781,1:sys65481:ifpeek(783)and1thenef=1:a$="[196]evice not present"
  105. 105 sys65511:print" "a$:return
  106.